package com.ideafactory.client.ybservice.ybviewpager;

import android.os.Environment;

import com.ideafactory.client.utils.GlideImageLoader;
import com.ideafactory.client.ybselfservice.R;
import com.ideafactory.client.ybservice.BaseFragment;
import com.youth.banner.Banner;
import com.youth.banner.BannerConfig;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2018/7/25.
 */

public class TeamInforPager extends BaseFragment {

    private  Banner banner;
    private List<String> mTailist=new ArrayList<>();
    @Override
    protected void initData() {
        //设置图片加载器
        banner.setImageLoader(new GlideImageLoader());
        String RESOURSE_MENU = Environment.getExternalStorageDirectory().getAbsolutePath();
        mTailist.add(RESOURSE_MENU+"/thailand/"+"img1.png");
        mTailist.add(RESOURSE_MENU+"/thailand/"+"img2.png");
        mTailist.add(RESOURSE_MENU+"/thailand/"+"img3.png");
        mTailist.add(RESOURSE_MENU+"/thailand/"+"img4.png");
        mTailist.add(RESOURSE_MENU+"/thailand/"+"img5.png");
        banner.setBannerStyle(BannerConfig.NOT_INDICATOR);
        //设置图片集合
        banner.setImages(mTailist);

        //banner设置方法全部调用完毕时最后调用
        banner.start();
    }

    @Override
    protected void initID() {
        banner= (Banner) view.findViewById(R.id.banner);
    }

    @Override
    public int setContentView() {
        return R.layout.fragment_companyinfo;
    }
}
